package com.wyclabs.api;

import com.wyclabs.commons.constants.ServiceName;
import com.wyclabs.commons.entity.JsonResult;
import com.wyclabs.commons.request.UserCreateRequest;
import com.wyclabs.commons.response.UserResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * user - 用户 Service接口类
 * @date 2019-10-10
 */
@FeignClient(name = ServiceName.USER, path = "/api/user")
public interface UserResource {

    @RequestMapping("/test")
    void test();

    @PostMapping("/create")
    JsonResult create(UserCreateRequest request);

    @GetMapping("/findByUserName")
    JsonResult<UserResponse> findByUserName(String userName);
}
